<?php
defined('_JEXEC') or die('Restricted access');

$section = JRequest::getVar("section");

$xml = "<?xml version='1.0' encoding='utf-8'?><form>";
$xml .= "<fieldset name='accesscontrol' addfieldpath='/administrator/components/com_ketnoi/models/fields'>";
$xml .= "<field name='asset_id' type='text' />";
$xml .= "<field name='rules' type='rules' label='Rules' filter='rules' validate='rules' component='com_ketnoi' section='$section' />";
$xml .= "</fieldset>";
$xml .= "</form>";
$form = JForm::getInstance('accesscontrol',$xml,Array());
if(!empty($this->asset_id)) $form->setValue("asset_id",null,$this->asset_id);

?>
<form method="post" action="index.php" name='form_create_phanquyen' id="form_create_phanquyen" class='form'>
<div class='tab_content' id="tab_create_phanquyen">
	<div class='container-fluid margin10'>
		<div class='row-fluid'>
			<div class='widget widget-padding span12'>
				<div class='widget-header'>
					<i class="icon-list-alt"></i>
					<h5>Phân quyền</h5>
				</div>
				<div class='widget-body'>
					<div class='row-fluid'>
						<div class='span12'>
							<button class='btn btn-primary' type="submit">
								<i class='icon-ok icon-white'></i>
								Lưu
							</button>
						</div>
					</div>
					<br>
					<div class="row-fluid">
						<div class='span12'>
							<?php echo $form->getInput("rules"); ?>
						</div>
					</div>
					
				</div>
				
			</div>
		</div>
	</div>
</div>
<input type="hidden" name="section" value="<?php echo $section ?>" />
<input type="hidden" name="option" value="com_ketnoi" />
<input type="hidden" name="view" value="phanquyen" />
<input type="hidden" name="task" value="phanquyen.save" />
<input type="hidden" name="tmpl" value="raw" />
</form>
